<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>tango.util.collection.impl.MapCollection</title>
  <link href="./css/style.css" rel="stylesheet" type="text/css"/>
  <!-- <link href="./img/icon.png" rel="icon" type="image/png"/> -->
  <script type="text/javascript" src="./js/jquery.js"></script>
  <script type="text/javascript" src="./js/modules.js"></script>
  <script type="text/javascript" src="./js/quicksearch.js"></script>
  <script type="text/javascript" src="./js/navigation.js"></script>
  <!--<script type="text/javascript" src="./js/jquery.treeview.js"></script>-->
  <script type="text/javascript">
    var g_moduleFQN = "tango.util.collection.impl.MapCollection";
  </script>
  
</head>
<body>
<div id="content">
  <h1><a href="./htmlsrc/tango.util.collection.impl.MapCollection.html" class="symbol">tango.util.collection.impl.MapCollection</a></h1>
  
<p class="sec_header">File:</p>MapCollection.d
<p class="bl"/>
        Originally written by Doug Lea and released into the public domain. 
        Thanks for the assistance and support of Sun Microsystems Labs, Agorics 
        Inc, Loral, and everyone contributing, testing, and using this code.
<p class="sec_header">History:</p>Date     Who                What
        13Oct95  dl                 Create
        28jan97  dl                 make class public
        14Dec06  kb                 adapted for Tango usage
<dl>
<dt class="decl">class <a class="symbol _class" name="MapCollection" href="./htmlsrc/tango.util.collection.impl.MapCollection.html#L43" kind="class" beg="43" end="231">MapCollection</a><span class="tparams">(K, T)</span> : Collection!(T), Map!(K, T); <a title="Permalink to this symbol" href="#MapCollection" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.impl.MapCollection.html#L43">#</a></dt>
<dd class="ddef">
<div class="summary">MapCollection extends Collection to provide default implementations of
        some Map operations.</div>
<p class="sec_header">Author:</p>Doug Lea
                @version 0.93
<p class="bl"/>
        <P> For an introduction to this package see <A HREF="index.html"
        > Overview </A>.
<dl>
<dt class="decl"><a class="symbol _ctor" name="MapCollection.this" href="./htmlsrc/tango.util.collection.impl.MapCollection.html#L56" kind="ctor" beg="56" end="59">this</a><span class="params">()</span>; <span class="attrs">[<span class="prot">protected</span>]</span> <a title="Permalink to this symbol" href="#MapCollection.this" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.impl.MapCollection.html#L56">#</a></dt>
<dd class="ddef">
<div class="summary">Initialize at version 0, an empty count, and null screener</div></dd>
<dt class="decl"><a class="symbol _ctor" name="MapCollection.this:2" href="./htmlsrc/tango.util.collection.impl.MapCollection.html#L67" kind="ctor" beg="67" end="70">this</a><span class="params">(Predicate <em>screener</em>)</span>; <span class="attrs">[<span class="prot">protected</span>]</span> <a title="Permalink to this symbol" href="#MapCollection.this:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.impl.MapCollection.html#L67">#</a></dt>
<dd class="ddef">
<div class="summary">Initialize at version 0, an empty count, and supplied screener</div></dd>
<dt class="decl">bool <a class="symbol _function" name="MapCollection.allowsKey" href="./htmlsrc/tango.util.collection.impl.MapCollection.html#L81" kind="function" beg="81" end="84">allowsKey</a><span class="params">(K <em>key</em>)</span>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">final</span>]</span> <a title="Permalink to this symbol" href="#MapCollection.allowsKey" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.impl.MapCollection.html#L81">#</a></dt>
<dd class="ddef">
<div class="summary">Implements tango.util.collection.Map.allowsKey.
                Default key-screen. Just checks for null.</div>
<p class="sec_header">See Also:</p>tango.util.collection.Map.allowsKey</dd>
<dt class="decl">void <a class="symbol _function" name="MapCollection.checkKey" href="./htmlsrc/tango.util.collection.impl.MapCollection.html#L102" kind="function" beg="102" end="108">checkKey</a><span class="params">(K <em>key</em>)</span>; <span class="attrs">[<span class="prot">protected</span>, <span class="stc">final</span>]</span> <a title="Permalink to this symbol" href="#MapCollection.checkKey" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.impl.MapCollection.html#L102">#</a></dt>
<dd class="ddef">
<div class="summary">Principal method to throw a IllegalElementException for keys</div></dd>
<dt class="decl">void <a class="symbol _function" name="MapCollection.opIndexAssign" href="./htmlsrc/tango.util.collection.impl.MapCollection.html#L119" kind="function" beg="119" end="122">opIndexAssign</a><span class="params">(T <em>element</em>, K <em>key</em>)</span>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">final</span>]</span> <a title="Permalink to this symbol" href="#MapCollection.opIndexAssign" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.impl.MapCollection.html#L119">#</a></dt>
<dd class="ddef">
<div class="summary">Implements tango.util.collection.impl.MapCollection.MapCollection.opIndexAssign
                Just calls add(key, element).</div>
<p class="sec_header">See Also:</p>tango.util.collection.impl.MapCollection.MapCollection.add</dd>
<dt class="decl">bool <a class="symbol _function" name="MapCollection.matches" href="./htmlsrc/tango.util.collection.impl.MapCollection.html#L140" kind="function" beg="140" end="157">matches</a><span class="params">(View!(T) <em>other</em>)</span>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">override</span>]</span> <a title="Permalink to this symbol" href="#MapCollection.matches" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.impl.MapCollection.html#L140">#</a></dt>
<dd class="ddef">
<div class="summary">Implements tango.util.collection.impl.Collection.Collection.matches
                Time complexity: O(n).
                Default implementation. Fairly sleazy approach.
                (Defensible only when you remember that it is just a default impl.)
                It tries to cast to one of the known collection interface types
                and then applies the corresponding comparison rules.
                This suffices for all currently supported collection types,
                but must be overridden if you define new Collection subinterfaces
                and/or implementations.</div>
<p class="sec_header">See Also:</p>tango.util.collection.impl.Collection.Collection.matches</dd>
<dt class="decl">void <a class="symbol _function" name="MapCollection.removeAll" href="./htmlsrc/tango.util.collection.impl.MapCollection.html#L210" kind="function" beg="210" end="214">removeAll</a><span class="params">(Iterator!(T) <em>e</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#MapCollection.removeAll" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.impl.MapCollection.html#L210">#</a></dt>
<dd class="ddef">
<div class="summary">Implements tango.util.collection.impl.Collection.Collection.removeAll</div>
<p class="sec_header">See Also:</p>tango.util.collection.impl.Collection.Collection.removeAll
<p class="bl"/>
                Has to be here rather than in the superclass to satisfy
                D interface idioms</dd>
<dt class="decl">void <a class="symbol _function" name="MapCollection.remove" href="./htmlsrc/tango.util.collection.impl.MapCollection.html#L226" kind="function" beg="226" end="230">remove</a><span class="params">(Iterator!(T) <em>e</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#MapCollection.remove" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.util.collection.impl.MapCollection.html#L226">#</a></dt>
<dd class="ddef">
<div class="summary">Implements tango.util.collection.impl.Collection.Collection.removeElements</div>
<p class="sec_header">See Also:</p>tango.util.collection.impl.Collection.Collection.removeElements
<p class="bl"/>
                Has to be here rather than in the superclass to satisfy
                D interface idioms</dd></dl></dd></dl>
</div>
<div id="footer">
  <p></p>
  <p>Page generated by <a href="http://code.google.com/p/dil">dil</a> on Fri Dec 26 04:04:10 2008. Rendered by <a href="http://code.google.com/p/dil/wiki/Kandil">kandil</a>.</p>
</div>
</body>
</html>